package design_pattern.decorator.test3;

/**
 * Created by WeiDingKuo on 2017/10/25 15:01
 * <p>
 * 如果装饰者只有一个，可以把子类省略
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("==== 组合1 ====");
        new Decorator(new ComponentImpl1()).dosomething();
        System.out.println();
        System.out.println("==== 组合2 ====");
        new Decorator(new ComponentImpl2()).dosomething();
    }
}
